package com.fegin.client.admin;

import com.fegin.Hystrix.admin.SysAgreementFeginHystrix;
import com.fegin.bean.admin.SysAgreement;
import com.fegin.common.ServerNameConstant;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;

/**
 * @author 张子艺
 * @packge com.fegin.client
 * @data 2019-01-22 15:09
 * @project CurrenCy-Cloud
 */
@FeignClient(value = ServerNameConstant.ADMIN_SERVER, fallbackFactory  = SysAgreementFeginHystrix.class)
public interface SysAgreementFegin {
    @RequestMapping(value = "/admin/sysAgreement/insert",
            method = RequestMethod.POST,
            consumes = MediaType.APPLICATION_JSON_VALUE
    )
    Map<String,Object> insertImage(@RequestBody SysAgreement sysAgreement);

    @RequestMapping(value = "/admin/sysAgreement/findAgreement",
            method = RequestMethod.GET,
            consumes = MediaType.APPLICATION_JSON_VALUE
    )
    Map<String,Object> findAgreement( );
}
